package page.sample.ClientPage;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.markup.repeater.data.ListDataProvider;

import page.sample.AuthorizationPage;
import entity.Client;
import entity.InfoUser;

public class ShowProfilePage extends WebPage {

	public ShowProfilePage(final InfoUser infoUser) {
		add(new Label("login", infoUser.getLogin()));
		add(new Label("password", infoUser.getPassword()));
		add(new Label("name", infoUser.getName()));
		add(new Label("surname", infoUser.getSurname()));

		add(new Link("ShowProfile") {

			@Override
			public void onClick() {
				setResponsePage(new ShowProfilePage(infoUser));

			}

		});

		add(new Link("EditProfile") {

			@Override
			public void onClick() {
				setResponsePage(new EditProfilePage(infoUser));

			}

		});
		add(new Link("exit") {

			@Override
			public void onClick() {
				setResponsePage(new AuthorizationPage());

			}

		});
		
		add(new Link("showCard")
		{

			@Override
			public void onClick() {
				setResponsePage(new ShowCreditCardPage(infoUser));
				
			}
			
		});
	}
}
